package com.lykj.gm.test;

public class Triangle {

	public String testTriangleTyle(int a, int b, int c) {
		
		String result = "";
		
		if (a > 0 && b > 0 && c > 0) {
			
			if ((a + b > c) && (a + c > b) && (b + c) > a) {
				
				if ((a == b) || (a == c) || (b == c)) {
					
					if ((a == b) && (b == c)) {
						result = "The triangle is equilateral";
					} else {
						result = "The triangle is isosceles";
					}
				} else {
					result = "The triangle is scalene";
				}
			} else {
				result = "Can not constitute a triangle";
			}
		} else {
			result = "Can not constitute a triangle";
		}
		
		return result;
	}
}
